SUBROUTINE LABEL1
     * Display a simple form, requesting entry of a name in single
     * Editbox. The Editbox has an associated label.

     * Include the RealWeb definitions.
     INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP

     * Start the HTML page.
     CALL RW_START_HTML_PAGE("Label example", "", "", "", "")

     * Prompt the user.
     CALL RW_PUT("Please enter your name in the box, then click the Go button")

     * Start the form.
     CALL RW_START_HTML_FORM("HELLO","FORM1","")

     * To give the Editbox a label, we first put the Editbox in a string.
     txtName = ""
     CALL RWA_EDIT_BOX(txtName, "txtName", 30, "")
     * Then we enclose the Editbox in the label.
     CALL RWS_LABEL(txtName, "Name: ", "")
     * Output to two controls.
     CALL RW_PUT(txtName)

     CALL RW_SUBMIT_BUTTON("GO","") ;* Give the form a submit button.

     CALL RW_END_FORM               ;* Complete the form.

     CALL RW_END_PAGE               ;* Complete the page.
RETURN

Go to top button